package com.itheima.web.controller.cms;


import com.itheima.service.cms.ICmsPrefrenceAreaService;
import com.itheima.utils.ResultData;
import com.itheima.vo.cms.CmsPrefrenceArea;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 优选专区 前端控制器
 * </p>
 *
 * @author 王志斌
 * @since 2022-07-06
 */
@RestController
@RequestMapping("/prefrenceArea")
public class CmsPrefrenceAreaController {
@DubboReference
    private ICmsPrefrenceAreaService cmsPrefrenceAreaService;
    /**
     * 获取所有商品优选
     * @return
     */
    @GetMapping("/listAll")
    public ResultData listAll(){
        List<CmsPrefrenceArea> list = cmsPrefrenceAreaService.listAll();
        return ResultData.ok("",list);
    }
}
